package net.dntuan.training.spring.schedule;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * Do nothing, just demonstrate how to configure a schedule.
 *
 * @author tuan.dangnhu
 * 
 * $LastChangedRevision: 121 $
 * $LastChangedDate: 2014-10-04 10:49:44 +0000 (Sat, 04 Oct 2014) $
 * $LastChangedBy: dnhutuan@gmail.com $
 */
@Service
public class DebtUpdaterCronJob {

  private static final Logger logger = LoggerFactory.getLogger(DebtUpdaterCronJob.class);

  @Value("${eviction_runs_interval_millis}")
  private String interval;

//  @Scheduled(fixedDelay = 30000)
  public void update() {
    logger.info("interval from properties file: " + interval);
    logger.info("just demonstrate creating a schedule ...");
  }
}
